#include "TcpClient.hpp"
#include <memory>

void Usage(const string & pro)
{
    cout << "Usage:\n\t" << pro << " serverip serverport" << endl;
}

int main(int argc, char* argv[])
{
    if(argc != 3)
    {
        Usage(argv[0]);
        exit(USAGE_FAIL);
    }

    unique_ptr<TcpClient> up_tc(new TcpClient(argv[1], stoi(argv[2])));
    up_tc->Init();
    up_tc->Start();

    return 0;
}